<?php
/**
 * @file name : my_string_helper.php
 * @package   :
 * @author    : Vo Thanh Minh
 * @email     : <thanhminhld@yahoo.com - thanhminhld@gmail.com>
 * @copyright : 2011
 *
 */
 if (!defined('BASEPATH')) {
    exit('No direct script access');
}
/**
 * clipString
 *
 */
if ( ! function_exists('strip_slashes'))
{
    function clipString($str, $len)
    {
        if (!is_string($str) || strlen($str) <= 0) {
            return '';
        }
        $str = strlen($str) < $len ? $str : substr($str, 0 , $len) . '...';

        return $str;
    }
}